package com.xcf.cloud.mailsvc.client;

import com.xcf.cloud.mailsvc.EmailConstant;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @author xiaocf
 */
@FeignClient(name = EmailConstant.SERVICE_NAME, path = EmailConstant.SERVICE_CONTEXT_PATH)
       // url = EmailConstant.SERVICE_ENDPOINT)
public interface EmailClient {

    /**
     * 发送验证码到邮箱，true成功，false失败
     *
     * @param email 邮箱地址
     * @param code  验证码
     * @return true成功，false失败
     */
    @GetMapping(EmailConstant.Path.SEND_MAIL)
    boolean sendMail(@PathVariable("email") String email, @PathVariable("code") String code);
}
